package sicnu.cs.ich.api.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 黎琦
 * @date 2021/12/1 21:49
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_activity_comments")
public class ActivityComments implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    @NotNull(message = "activityId不能为空")
    private Integer activityId;
    private Integer userId;
    @NotNull(message = "parentId不能为空")
    private Integer parentId;
    private Integer ancestorId;
    @NotNull(message = "content不能为空")
    private String content;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;
    private Integer likeNum;
    private Integer status;
}
